package com.yueguang.springai.config;

import com.volcengine.tos.TOSV2;
import com.volcengine.tos.TOSV2ClientBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class TOSV2ClientBuilderConfig {
    @Value("${doubao.tos.endpoint}")
    private String endpoint;
    @Value("${doubao.tos.region}")
    private String region;
    @Value("${doubao.tos.accessKey}")
    private String accessKey;
    @Value("${doubao.tos.secretKey}")
    private String secretKey;

    @Bean
    public TOSV2 getEndpoint() {
        return new TOSV2ClientBuilder().build(region, endpoint, accessKey, secretKey);

    }

}
